<template>
  <view class="tab-component">
    <view class="bottom-tab-box">
      <view
        class="left-tab-item"
        v-for="(item, index) in menuList"
        :key="index"
      >
        <view class="left-content">
          <text class="iconfont" :class="item.icon"></text>
          <text class="title">{{ item.title }}</text>
        </view>
        <view class="right-content">
          <text class="num">{{ item.num }}</text>
          <text class="iconfont icon-weibiaoti--10"></text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { defineComponent, reactive, toRefs } from "vue";
export default defineComponent({
  name: "",
  props: {},
  components: {},
  setup() {
    const data = reactive({
      menuList: [
        { icon: "icon-weibiaoti--29", title: "喜欢", num: 1 },
        { icon: "icon-weibiaoti--26", title: "收藏", num: 0 },
        { icon: "icon-weibiaoti--31", title: "关注品牌", num: 0 },
        { icon: "icon-weibiaoti--1", title: "消息", num: 7 },
      ],
    });
    return {
      ...toRefs(data),
    };
  },
});
</script>

<style scoped lang="less">
.tab-component {
  display: flex;
  flex-direction: column;
  // padding: 20rpx 0;
  background: #eee;
  .bottom-tab-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    // grid-template-rows: repeat(2, 100rpx);
    column-gap: 10px;
    row-gap: 10px;
    width: 100%;

    .left-tab-item {
      display: flex;
      background: #fff;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      padding: 20rpx 40rpx;
      box-sizing: border-box;
      border-radius: 6rpx;
      .left-content {
        display: flex;
        flex-direction: row;
        align-items: center;

        .iconfont {
          font-size: 40rpx;
          margin-right: 12rpx;
        }
        .title {
          font-size: 26rpx;
        }
      }
      .right-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        .num {
          font-size: 22rpx;
          margin-right: 10rpx;
        }
        .icon-weibiaoti--10 {
          font-size: 20upx;
          display: block;
          transform: rotate(180deg);
        }
      }
    }
  }
}
</style>
